<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class PrizeLog extends Model
{
    protected  $table= "user_prize_logs";
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'x_uid', 'prize_id', 'rand_id',
    ];

    protected $hidden = [
        'remember_token',
    ];

    public function users(){
        return $this->hasOne('App\Models\WxUser','id','x_uid');
    }

    public function PrizeRank(){
        return $this->hasOne('App\Models\PrizeRank','id','rank_id');
    }
    public function Prize(){
        return $this->hasOne('App\Models\Prize','id','prize_id');
    }
}
